package org.crazydog.converter.tests;

import org.crazydog.converter.feet.Calculator;

import junit.framework.TestCase;

public class CalculatorTest extends TestCase {

	/**
	 * 
	 *
	 */
	public static void testConvertFeetToMeters() {
		assertEquals("Conversion incorrect", 0.3048d, Calculator.ConvertFeetToMeters(1d), 0);
		assertEquals("Conversion incorrect", 2*0.3048d, Calculator.ConvertFeetToMeters(2d), 0);
		assertEquals("Conversion incorrect", 5.2*0.3048d, Calculator.ConvertFeetToMeters(5.2d), 0);
	}

	/**
	 * 
	 *
	 */
	public void testConvertMetersToFeet() {
		assertEquals("Conversion incorrect", 3.2808399d, Calculator.ConvertMetersToFeet(1d), 0);
		assertEquals("Conversion incorrect", 2*3.2808399d, Calculator.ConvertMetersToFeet(2d), 0);
		assertEquals("Conversion incorrect", 5.2*3.2808399d, Calculator.ConvertMetersToFeet(5.2d), 0);
	}

}
